<!--************************************************************ -->
<!--* 文件创建日期：2010                                  * -->
<!--* 文件修改日期：			                                   * -->
<!--************************************************************ -->
<!--JSP初始化设置-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.infomanage.service.plan.*"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	String positionId = request.getParameter("positionId");
    if(positionId == null) positionId = "";
    
    PositionPlanItem position = PositionAdjustPlanService.loadPositionPlan(request, response, out);
%>
<html>
<head>
	<title>报废装备管理</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<link href="../../css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/calendar.js"></script>
	<script type="text/javascript">
		var currTreeInputObj = null;// 当前点击显示数输入框
		function showTree(obj) {
			currTreeInputObj = obj.childNodes[0];
			frame.location.href = "../common/deptTree.jsp";
			var treeFrame = document.getElementById("treeFrame");
			treeFrame.style.display = "";
			var region = obj.getBoundingClientRect();
			treeFrame.style.left = region.left;
			treeFrame.style.top = region.bottom;
			treeFrame.style.width = obj.clientWidth;
			treeFrame.style.height = 200;
		}

		function clickBody() {
			var srcObj = event.srcElement;
			var treeFrame = document.getElementById("treeFrame");
			if(srcObj.treeSelect == "true"){
				
			}else {
				treeFrame.style.display = "none";
			}
		}
		function selectNode(id, title){
			currTreeInputObj.value = title;
			currTreeInputObj.nextSibling.value = id;
			var treeFrame = document.getElementById("treeFrame");
			treeFrame.style.display = "none";
       }

	   function init() {
		   if("" != "<%=positionId%>") { // 修改
		   }
	   }
	   // 提交
	   function doSubmit(){
		 	if("" == "<%=positionId%>") {
		 		form1.actionType.value = "add";
			}else {
		 		form1.actionType.value = "modify";
			}
		 	form1.submit();
	   }

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   alert(info);
		   window.returnValue = "ok";
		   window.close();
	   }
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0" onclick="clickBody();" onload="init();">
	<form name="form1" action="positionAdjust_action.jsp" method="post" target="actionFrame">
	<input type="hidden" name="positionId" value="<%=positionId%>">
	<input type="hidden" name="actionType">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>报废装备管理</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td>
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="30%">
					<col width="70%">
					<tr>
						<td class="field">
							姓名
						</td>
						<td>
							<input type="text" style="width: 100%">
						</td>
					</tr>
					<tr>
						<td class="field">
							所属单位
						</td>
						<td>
							<span class="treeSpan" onclick="showTree(this);" treeSelect="true">
								<input value="satan" style="width: 338px;" 
								readonly="readonly" treeSelect="true"><input name="deptId" value="" type="hidden">
							</span>
						</td>
					</tr>
					<tr>
						<td class="field">
							负责人
						</td>
						<td>
							<span class="treeSpan" onclick="showTree(this);" treeSelect="true">
								<input nodeId="" id="deptTreeInput" value="" 
									style="width: 338px;" readonly="readonly" 
									treeSelect="true"><input name="personId" value="" type="hidden">
							</span>
						</td>
					</tr>
					<tr>
						<td  class="field">
							数量
						</td>
						<td>
							<input type="text" style="width: 100%">
						</td>
					</tr>
					<tr>
						<td class="field">
							型号
						</td>
						<td>
							<input type="text" style="width: 100%">
						</td>
					</tr>
					<tr>
						<td class="field">
							用途
						</td>
						<td>
							<input type="text" style="width: 100%">
						</td>
					</tr>
					<tr>
						<td class="field" rowspan="2">
							报废原因
						</td>
						<td rowspan="2" valign="top">
							<textarea style="width: 100%;height: 100%;"></textarea>
						</td>
					</tr>
					<tr>
						<td colspan="2">&nbsp;</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="tableBtn">
				<span onclick="doSubmit();">确定</span>
				<span onclick="window.close();">取消</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
	</form>
	<iframe src="#" frameborder="0" id="treeFrame" name="frame" style="display: none;position: absolute;"></iframe>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</body>
</html>